Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 15: Building Extruded Shapes

../ch15/15fig16.gif
Figure 15.16

A lipstick shape created by rotating a circular cross section about the X axis as it is extruded.

15fig16.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Shape {
    appearance Appearance {
        material Material {
            diffuseColor 1.0 0.3 0.3
        }
    }
    geometry Extrusion {
        creaseAngle 1.57
        crossSection [
        # Circle
             1.00  0.00,   0.92 -0.38,
             0.71 -0.71,   0.38 -0.92,
             0.00 -1.00,  -0.38 -0.92,
            -0.71 -0.71,  -0.92 -0.38,
            -1.00 -0.0,   -0.92  0.38,
            -0.71  0.71,  -0.38  0.92,
             0.00  1.00,   0.38  0.92,
             0.71  0.71,   0.92  0.38,
             1.00  0.00
        ]
        spine [
        # Straight-line
            0.0 0.0 0.0,  0.0 4.0 0.0,
        ]
        orientation [
            0.0 1.0 0.0 0.0,  1.0 0.0 0.0 0.785
        ]
    }
}